/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tickets;

import java.sql.ResultSet;

/**
 *
 * @author Nacho
 */
public class Comentario {
    
    private String comment;
    private String date;
    private Usuario user;
    private Conexion conexion;
    private  int ticketID;

    public Comentario(int ticketId, Conexion conexion) {
       this.ticketID= ticketID;
        this.conexion = conexion;
        //POPULA CAMPOS CON CONEXION---------------------------------------------------------
    }

    public Comentario(int ticketID, String comment, String date, Usuario user, Conexion conexion) {
        this.conexion = conexion;
        this.comment = comment;
        this.date = date;
        this.user = user;
        this.ticketID= ticketID;
    }

    

    public Usuario getUser() {
        return user;
    }

    public void setUser(Usuario user) {
        this.user = user;
    } 



    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }
    public void commit(){
        //ToDo: -------------------------------------------
        String sp = ""; //-----------------------------------------
        conexion.ejecutaSP(sp);
    }
    
    
    
    
    
}
